package com.qidianit.mes.pro.mapper;

import java.util.List;
import com.qidianit.mes.pojo.pro.Process;
import org.apache.ibatis.annotations.Param;
import org.apache.tomcat.jni.Proc;

/**
 * @ Description:
 * @ Author: 戴着假发的程序员
 * @ Date: 2025/9/17 - 14:37
 */
public interface ProcessMapper {

    List<Process> selectListByWorkflowId(Long workflowId);

    /**
     * 根据processCode、processName、isActive多条件查询Process列表
     * @param process
     * @return
     */
    List<Process> selectList(Process process);

    /**
     *
     * @param process
     * @return
     */
    int saveProcess(Process process);

    /**
     * 根据编号查询工序
     * @param processCode
     * @return
     */
    Process selectByCode(String processCode);

    /**
     * 根据ID编辑工序
     * @param process
     * @return
     */
    int updateById(Process process);

    /**
     * 根据ID删除工序，删除是将delete_flag修改为1
     * @param id
     * @return
     */
    int deleteById(Long id);

    /**
     * 根据id数组批量删除工序，修改delete_falg为1
     * @param ids
     * @return
     */
    int batchDelete(@Param("ids") Long [] ids);

    Process selectById(Long processId);

    List<Process> selectProcessByWorkflowId(Long id);
}
